/**
 *******************************************************************************
 * @FileName  : hal_flash.h
 * @Author    : GaoQiu
 * @CreateDate: 2023-08-01
 * @Copyright : Copyright(C) GaoQiu
 *              All Rights Reserved.
 *******************************************************************************
 *
 * The information contained herein is confidential and proprietary property of
 * GaoQiu and is available under the terms of Commercial License Agreement
 * between GaoQiu and the licensee in separate contract or the terms described
 * here-in.
 *
 * This heading MUST NOT be removed from this file.
 *
 * Licensees are granted free, non-transferable use of the information in this
 * file under Mutual Non-Disclosure Agreement. NO WARRENTY of ANY KIND is provided.
 *
 *******************************************************************************
 */
#ifndef _HAL_FLASH_H_
#define _HAL_FLASH_H_

#include "utils/defs_types.h"

/* Flash Common Read/Write API */
int HalFlashEraseSector(uint32_t addr);

int HalFlashWrite(uint32_t addr, uint8_t *pdata, uint32_t len);
int HalFlashRead(uint32_t addr, uint8_t *pRes, uint32_t len);

/* Flash Read/Write Info Area API */
void HalFlashEraseInfoArea(void);
void HalFlashWriteInfoArea(uint32_t addr, uint8_t *pdata, uint32_t len);
void HalFlashReadInfoArea(uint32_t addr, uint8_t *buf, uint32_t len);

#endif /* _HAL_FLASH_H_ */
